package inherit;
/*
*学生类
 */

public class Student extends  person {
    private String sno;//学号
    private String grade;//年级

public  Student(){}//会自动调用父类的构造方法
  public  Student(int age,String name,String sno,String grade){
        super(age,name);//调用父类的构造方法
      this.sno = sno;
       this.grade = grade;
   }

    @Override
    public void study(){
        System.out.println("我是学生，我在学习");
    }

    @Override
    public String toString() {
        return super.toString()+"\t"+sno+"\t"+grade+"\t";
    }
}
